package org.comple.erp.remote.finance;

import org.comple.erp.pojo.finance.Account;
import org.comple.erp.utils.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.List;

public interface AccountRemote {
    /**
     * 获取所有账户列表
     * @param companyCode
     * @return
     */
    @GetMapping("/getAllAccountList")
    List<Account> getAllAccountList(@RequestParam("companyCode") String companyCode);

    /**
     * 更新账户余额
     * @param account_code 账户编号
     * @param companyCode 公司编号
     * @param amount 本次收款或付款金额
     * @return
     */
    @PostMapping("/updateAccountBalance")
    public AjaxResult updateAccountBalance(@RequestParam("account_code") String account_code, @RequestParam("companyCode") String companyCode, @RequestParam("amount") BigDecimal amount);
}
